package cn.iocoder.yudao.module.yyzx.dal.mysql.nurser;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.yyzx.dal.dataobject.nurser.NurserDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.yyzx.controller.admin.nurser.vo.*;

/**
 * 护工 Mapper
 *
 * @author lovedream
 */
@Mapper
public interface NurserMapper extends BaseMapperX<NurserDO> {

    default PageResult<NurserDO> selectPage(NurserPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<NurserDO>()
                .likeIfPresent(NurserDO::getNurserName, reqVO.getNurserName())
                .eqIfPresent(NurserDO::getNurserLevel, reqVO.getNurserLevel())
                .eqIfPresent(NurserDO::getNurserInformation, reqVO.getNurserInformation())
                .betweenIfPresent(NurserDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(NurserDO::getId));
    }

}